package com.itzxx.huazhun.utils.ble

import cn.com.heaton.blelibrary.ble.model.BleDevice

/**
 * Desc:
 *
 * Author: zhangxiaoxiao
 * Date: 2024/7/25 19:13
 * Updater:
 * Update Time:
 * Update Comments:
 */
open class BleListener{


    open fun startBleScan(){

    }

    open fun onBleScanFirstDevice(device: BleDevice){

    }

    open fun stopBleScan(devices: ArrayList<BleDevice>) {

    }

    open fun onScanFailed(errorMsg: String){

    }

    /**
     * 接收数据
     * @param json String
     */
    open fun onEnableDataNotify(type: UByte, json: String){

    }

    /**
     * 连接成功后能接收数据
     * @param device BleDevice
     */
    open fun onNotifySuccess(device: BleDevice){

    }

    /**
     * 连接成功后能接收数据
     * @param device BleDevice
     */
    open fun onConnectFail(errorMsg: String){

    }
}